#include <iostream>  
#include "Physics.h"


using namespace Physics::Electricity; 


using std::cout; 
using std::endl; 
using std::cerr; 


// Lookup table which holds different 
// material resistance.
double resistance[] = {
			           1.59 * pow(10.0, -8),		// Silver 
				  1.7  * pow(10.0, -8),	// Copper
				  3.5  * pow(10.0, -5)	// Carbon 
			}; 


// The time (in seconds) needed for electric charge transferr
// through a given wire
double time[] = {
		   300.0, 
			3.8,
		}; 
				    


int main(int argc, char *argv[])
{
  
    double q1 = 3.2 * pow(10.0, -4);
	double q2 = 0.5 * pow(10.0, -7);  

	double current = 0.0;	 // (coulomb / second) 
	double charge  = 750.0;  // coulomb
	int	   range   = 3;		 // meters 
	
	try { 
	        // Calculate the current flowing through w1 for time t[0]
			current = calculateCurrent(charge, time[0]);
			cout << current << endl;

			// Calculate the force interaction between two point charges 
			long double F = forceOnTwoCharges(q1, q2, range); 
			cout << F << endl; 
	} catch (const char *msg) { 
		cerr << msg << endl; 
	}

	return 0; 
}

